using System;
using System.Collections.Generic;
using System.Text;

namespace WebCrawlerTools.page
{
    public class Page
    {
        private string name = "";
        private string url = "";
        private string template = "";
        private PLoop loop;
        private PPageType type;

        public String Url
        {
            get
            {
                return url;
            }
            set
            {
                url = value;
            }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public String Template
        {
            get{return template;}
            set{ template = value;}
        }

        public PPageType PageType
        {
            get
            {
                return type;
            }
            set
            {
                type = value;
            }
        }
        public PLoop Loop
        {
            get
            {
                return loop;
            }
            set
            {
                loop = value;
            }
        }
    }

    public class PHomePage : Page
    {
        public PHomePage()
        {
            Name = "Home Page";
            PageType = PPageType.HOME_PAGE; 
        }
        private PSubPage subPage = new PSubPage();

        public PSubPage SubPage
        {
            get
            {
                return subPage;   
            }
            set
            {
                subPage = value;
            }
        }
    }

    public class PSubPage : Page
    {
        public PSubPage()
        {
            Name = "Sub Page";
            PageType = PPageType.SUB_PAGE; 
        }
    }

    public enum PPageType
    {
        HOME_PAGE,
        SUB_PAGE,
    }
}
